home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / PAGE-ILL.ZIP / POCSAG.TXT < prev   
Text File  |  1995-07-22  |  10KB  |  191 lines

  1.  
  2.     The following summary describes the coding used on POCSAG pager
  3. signals and may be of interest to those curious about what those ear-splitting
  4. beeps and buzzes mean and how they encode data.   This summary is
  5. based on a very old text of the standard from my files; the current
  6. text of the POCSAG standard is available as CCIR Radiopaging Format 1.
  7.  
  8.     Note that some current POCSAG signals (so called Super-POCSAG)
  9. transmit paging at 1200 or 2400 baud instead of the 512 baud I refer to
  10. here, but use essentially a similar coding standard. 
  11.  
  12.     The interested USA reader is reminded that willfully intercepting
  13. other than tone only paging is a violation of the ECPA with similar
  14. penalties and criminal status to willfully intercepting cellular phone calls.
  15.  
  16.     The interested reader is advised that at least two of Universal
  17. Shortwave's RTTY reading devices (the M8000 and the new C-400) are
  18. capable of reading at least the older 512 baud version of POCSAG paging,
  19. so commercial devices for this purpose are currently being sold in
  20. the USA.
  21.  
  22.     And finally, much alphanumeric paging - particularly that installed
  23. some time ago, uses a proprietary Motorola encoding format called
  24. GOLAY which is quite different from POCSAG.  The two can be told apart
  25. by their baud rates - GOLAY is 600 baud.
  26.  
  27.  
  28.         POCSAG
  29.  
  30.  
  31.     First POCSAG stands for Post Office Code Standarization Advisory
  32. Group.   Post office in this context is the British Post Office
  33. which used to be the supplier of all telecommunications services in
  34. England before privatization.
  35.  
  36.     POCSAG as defined in the standard, (original POCSAG) is 512 bits
  37. per second direct FSK (not AFSK) of the carrier wave with +- 4.5 khz shift
  38. (less deviation than that is used in some US systems).  Data is
  39. NRZ coded with the higher frequency representing 0 (space) and the
  40. lower one representing 1 (mark).
  41.  
  42.     The basic unit of data in a POCSAG message is the codeword which
  43. is always a 32 bit long entity.  The most significant bit of a codeword
  44. is transmitted first followed immediately by the next most significant
  45. bit and so forth.  The data is NRZ, so that mark and space values (plus
  46. and minus voltages) as sampled on the output of the receiver
  47. discriminator at a 512 hz rate corrospond directly to bits in the
  48. codeword starting with the MSB.   (Note that the audio output circuitry
  49. following the discriminator in a typical voice scanner may considerably
  50. distort this square wave pattern of bits, so it is best to take the
  51. signal directly off the discriminator before the audio filtering).
  52.  
  53.     The first (msb) bit of every POCSAG codeword (bit 31) indicates 
  54. whether the codeword is an address codeword (pager address) (bit 31 = 0)
  55. or a message codeword (bit 31 = 1).  The two codeword types have
  56. have different internal structure.
  57.  
  58.     Message codewords (bit 31 = 1) use the 20 bits starting at bit
  59. 30 (bit 30-11) as message data.  Address codewords (bit 31 = 0) use 18
  60. bits starting at bit 30 as address (bits 30-13) and bits 12 and 11 as
  61. function bits which indicate the type and format of the page.  Bits 10 through
  62. 1 of both types of codewords are the bits of a BCH (31,21) block ECC
  63. code computed over the first 31 bits of the codeword, and bit 0
  64. of both codeword types is an even parity bit.
  65.  
  66.     The BCH ECC code used provides a 6 bit hamming distance between
  67. all valid codewords in the possible set (that is every valid 32 bit
  68. codeword differs from ever other one in at least 6 bits).  This makes
  69. one or two bit error correction of codewords possible, and provides
  70. a robust error detection capability (very low chance of false pages).
  71. The generating polynomial for the (31,21) BCH code is x**10 + x**9
  72. + x**8 + x**6 + x**5 + x**3 + 1.
  73.  
  74.     Codewords are transmitted in groups of 16 (called batches), and
  75. each batch is preceeded by a special 17th codeword which contains a
  76. fixed frame synchronization pattern.  At least as of the date of the
  77. spec I have, this sync magic word was 0x7CD215D8. 
  78.  
  79.     Batches of codewords in a transmission are preceeded by a start
  80. of transmission preamble of reversals (10101010101 pattern) which must
  81. be at least 576 bits long.  Thus a transmission (paging burst) consists
  82. of carrier turnon during which it is modulated with 512 baud reversals
  83. (the preamble pattern) followed by at least 576/512 seconds worth of
  84. actual preamble, and then a sync codeword (0x7CD215D8), followed by 16
  85. data/address codewords, another sync codeword, 16 more data/address
  86. codewords and so forth until the traffic is completely transmitted.  As
  87. far I am aware there is no specified postamble.  I beleive that all 16
  88. of the last codewords of a transmission are always sent before the
  89. carrier is shut off, and if there is no message to be sent in them the
  90. idle codeword (0x7A89C197) is sent.  Later versions of the standard may
  91. have modified this however. 
  92.  
  93.     In order to save on battery power and not require that a pager
  94. receive all the bits of an entire transmission (allowing the receiver
  95. to be turned off most of the time, even when a message is being transmitted
  96. on the channel) a convention for addressing has been incorperated which
  97. splits the pager population into 8 groups.  Members of each group
  98. only pay attention to the two address code words following the synch
  99. codeword of a block that corrospond to their group.  This means that
  100. as far as addressing is concerned, the 16 codewords in a batch are
  101. divided into 8 frames of two codewords apiece and any given pager
  102. pays attention only to the two in the frame to which it assigned.
  103.  
  104.     A message to a pager consists of an address codeword in the
  105. proper two codeword frame within the batch to match the recipients frame
  106. assignment (based on the low three bits of the recipient's 21 bit
  107. effective address), and between 0 and n of the immediately following
  108. code words which contain the message text.  A message is terminated by
  109. either another address code word or an idle codeword.  Idle codewords
  110. have the special hex value of 0x7A89C197.  A message with a long text
  111. may potentially spill over between two or more 17 codeword batches. 
  112.  
  113.     Space in a batch between the end of a message in a transmission and
  114. either the end of the batch or the start of the next message (which of
  115. course can only start in the two correct two codeword frame assigned to
  116. the recipient) is filled with idle codewords.  A long message which
  117. spills between two or more batches does not disrupt the batch structure
  118. (sync codeword and 16 data/address code words - sync code word and 
  119. 16 data/address codewords and so forth) so it is possible for a pager
  120. not being addressed to predict when to next listen for its address and
  121. only turn on it's receiver then.
  122.  
  123.     The early standard text I have available to me specifies a 21 bit
  124. address format for a pager (I beleive this has been extended since) 
  125. with the upper 18 bits of a pager's address mapping into bits 
  126. 30-13 of the address codeword and the lower 3 bits specifiying which
  127. codewords within a 17 codeword batch to look at for possible messages.
  128. The address space is further subdivided into 4 different message classes
  129. as specified by the function bits (bits 12 and 11 of a codeword).  These
  130. address classes corrospond to different message types (for example
  131. bits 12 and 11 both zero indicate a numeric message encoded in 4 bit BCD,
  132. whilst bits 12 and 11 both set to 1 indicate an alpha message encoded
  133. in 7 bit ASCII).  It was apparently envisioned that a given pager could
  134. have different addresses for different message types.
  135.  
  136.     
  137.     There are two message coding formats defined for the text of messages,
  138. BCD and 7 bit ASCII.   BCD encoding packs 4 bit BCD symbols 5 to a codeword
  139. into bits 30-11.  The most significant nibble (bits 30,29,28,27) is the
  140. leftmost (or most significant) of a BCD coded numeric datum.  Values beyond 9
  141. in each nibble (ie 0xA through 0xF) are encoded as follows:
  142.  
  143.     0xA    Reserved (probably used for something now - address extension ?)
  144.     0xB    Character U (for urgency)
  145.     0xC    " ", Space (blank)
  146.     0xD    "-", Hyphen (or dash)
  147.     0xE    ")", Left bracket
  148.     0xF    "(", Right bracket    
  149.  
  150.     BCD messages are space padded with trailing 0xC's to fill the codeword.
  151. As far as I know there is no POCSAG specified restriction on length but
  152. particular pagers of course have a fixed number of characters in their
  153. display.
  154.     
  155.     Alphanumeric messages are encoded in 7 bit ASCII characters packed
  156. into the 20 bit data area of a message codeword (bits 30-11).  Since four
  157. seven bit characters are 21 rather than 20 bits and the designers of the
  158. standard did not want to waste transmission time, they chose to pack the
  159. first 20 bits of an ASCII message into the first code word, the next 
  160. 20 bits of a message into the next codeword and so forth.  This means
  161. that a 7 bit ASCII character of a message that falls on a boundary can
  162. and will be split between two code words, and that the alignment of character
  163. boundaries in a particular alpha message code word depends on which code
  164. word it is of a message.   Within a codeword 7 bit characters are packed
  165. from left to right (MSB to LSB).   The LSB of an ASCII character is sent
  166. first (is the MSB in the codeword) as per standard ASCII transmission
  167. conventions, so viewed as bits inside a codeword the characters are
  168. bit reversed.
  169.  
  170.     ASCII messages are terminated with ETX, or EOT (my documentation
  171. on this is vague) and the remainder of the last message codeword is
  172. padded to the right with zeros (which looks like some number of NULL
  173. characters with the last one possibly partial (less than 7 bits)). 
  174.  
  175.     The documentation I have does not specify how long a ASCII
  176. message may be, but I suspect that subsequent standards have probably
  177. addressed the issue and perhaps defined a higher level message protocol
  178. for partitioning messages into pieces.   The POCSAG standard clearly
  179. does seem to allow for the notion of encoding messages as mixed
  180. strings of 7 bit alpha encoded text and 4 bit BCD numerics, and it
  181. is at least possible that some pagers and paging systems use this
  182. to reduce message transmission time (probably by using some character
  183. other than ETX to delimit a partial ASCII message fragment).
  184.  
  185.  
  186. Brett Miller N7OLQ                  brett_miller@ccm.hf.intel.com
  187. Intel Corp.
  188. American Fork, UT                   DoD#1461
  189.  
  190. -----------------------------------------------------------------------------
  191.